#/bin/bash

lastkey=""
while read line; do
#   echo $line
   key=$(echo $line | cut -d " " -f 4,5)
   echo $key, $lastkey>&2

   if [ "$key" != "$lastkey" ]; then
      echo $lastline
   fi

   lastline=$line
   lastkey=$key

done < $1
